package com.example.seckilldemo.utils;

import org.apache.commons.lang3.StringUtils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author bc
 */

//手机号码校验
public class ValidatorUtil {

    private static final Pattern mobile_pattern = Pattern.compile("[1](3-9)[0-9]{9}$");

    public static boolean isMobile(String mobile){
        if(mobile != null) {
            return Pattern.matches("^1[3-9]\\d{9}$", mobile);
        }
        return false;
    }
}
